package com.chengdu.third.service.Impl;

import com.chengdu.third.dao.IBasicDao;
import com.chengdu.third.pojo.Basic;
import com.chengdu.third.service.IBasicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jingbo
 * @create 2021--08--15  21:16
 */

@Service
public class IBasicServiceImpl implements IBasicService {

    @Autowired
    private IBasicDao  iBasicDao;

    @Override
    public List<Basic> findAll() {
        return  iBasicDao.find();
    }

    @Override
    public void deleteByid(long id) {
          iBasicDao.delete(id);
    }

    @Override
    public void updateByid(String Area_prefectures,String Area_town,String Area_village,String context,long id) {
            iBasicDao.update(Area_prefectures, Area_town, Area_village, context, id);
    }

    @Override
    public void addBasic(String Area_prefectures,String Area_town,String Area_village,String context,String Reviw_units) {
          iBasicDao.add(Area_prefectures,Area_town,Area_village,context,Reviw_units);
    }

    @Override
    public Basic getBasicByid(long id) {
        return iBasicDao.getBasicById(id);
    }
}
